# The OpenGL Programming Guide and Reference Manual
(HTML Version!)

## Introduction

Are you sick of searching through the hardcopy OpenGL books to find the information you need? Have you tried the on-line versions of the books? They are quite useful, aren't they. Unfortunately, they have one major drawback. They take far too much time to download. Well, your prayers have been answered. You are looking at a complete downloadable version of the OpenGL Programming Guide and Reference Manual. Yes indeed, just place this entire web somewhere on your hard drive and you'll have instant access to the famed "Red Book" and "Blue Book". You DO NOT need to be connected to the Internet! Everything is here. All the images. All the figures and equations. All of it! And as an extra bonus, everything is hyperlinked for your convenience. Am I nice or what?

## Where Did This Come From?

The original text was retrieved from the following URLs:

    #1 http://ask.ii.uib.no/ebt-bin/nph-dweb/dynaweb/SGI_Developer/OpenGL_PG
    #2 http://ask.ii.uib.no/ebt-bin/nph-dweb/dynaweb/SGI_Developer/OpenGL_RM
    #3 http://trant.sgi.com/opengl/docs/man_pages/hardcopy/GL/html/

The text for the Programming Guide was derived from version 1.1 of the online documentation found at URL #1 above.
The text for the Reference Manual was taken from version 1.0 of the online documentation found at URL #2 above.
Portions of the Reference Manual pertaining to version 1.1 of the online documentation were taken from URL #3 above.

## What Has Changed?

I have poured over every page in this web over a period of several days. I have taken great pains to ensure that all interdocument links are correct and all images are viewable. You will also note that with the existing online version, function references would be shown in bold as in the following example taken from "Clearing the Window" in Chapter 2 of the Programming Guide:

> "The single parameter to glClear() indicates which buffers are to be cleared."

I have modified all of these references to provide a hyperlink to the specified function within the Reference Manual as follows:

> "The single parameter to glClear() indicates which buffers are to be cleared."

Note how both versions look identical, but when you pass your mouse over the glClear() function in the second version, it shows up as a hyperlink. I accomplished this using style sheets. The style sheet for ALL pages within this web is "oglstyle.css" and can be found in the root folder. The class name for all <A> (Anchor) tags with the bold and underlined style shown above is "rm" (for "Reference Manual"). The use of style sheets makes it a trivial process to change this style and have it applied to every document in this web.

There were several places within the original versions of the documentation where I needed to use a special font to "fix" improperly formatted HTML. You will understand what I mean if you try to view the original versions of these documents at the URLs listed above. The original versions failed to convert some mathmatical symbols to the correct HTML code and ended up generating HTML like the following (taken from "Computing Appropriate Texture Coordinates" in Chapter 9 of the original online version):

> "If you don't care about texture distortion, it's often quite easy to find a reasonable mapping. For example, consider a sphere whose surface coordinates are given by (cos &thgr; cos &phgr; , cos &thgr; sin &phgr; , sin &thgr; ), where" ...

Once again, I used style sheets to "fix" the problem. The original HTML code looked like ``

> "given by (cos &thgr; cos &phgr;"

I replaced the offending HTML with the following (see "Computing Appropriate Texture Coordinates" in Chapter 9 in this version): `

> "given by (cos <span class="sym">q</span> cos <span class="sym">f</span>"

` On my system, this generates the correct output as shown below:

> "If you don't care about texture distortion, it's often quite easy to find a reasonable mapping. For example, consider a sphere whose surface coordinates are given by (cos q cos f, cos q sin f, sin q), where" ...

As you can see, I used a custom <SPAN> tag. The class name is "sym" which stands for "symbol". "symbol" just happens to be the font I chose for this tag. If this setup doesn't work on your system, feel free to modify the style sheet to make it work.

## Copyright Information

Be aware that ALL materials within these documents are Copyright © Addison-Wesley Publishing Company and were reconstructed from the web documents to be more "download friendly".